import React from 'react';
import ReactDom from 'react-dom';
import {reducer,SHOW_NUMBER} from './Counter/index';
import Home from './Home';
import Article from './article';
import {createStore} from 'redux';
import {Provider} from 'react-redux';
import { Router,ReactRouter,BrowserRouter,Route,Link  } from 'react-router-dom';


// 初始state
var initialState = {
    type:SHOW_NUMBER,
    number:0,
    step:1
};

let store = createStore(reducer,initialState);


ReactDom.render(
    <Provider store={store}>
        <BrowserRouter>
            <div>
                <Route path="/home" component={Home}/>
                <Route path="/article" component={Article}/>
            </div>
        </BrowserRouter>
    </Provider>,
    document.getElementById('root')
)